/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.invoice.controller;

import javax.annotation.PostConstruct;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import org.primefaces.component.message.Message;

/**
 *
 * @author Lenin
 */
public abstract class BeanGenerico {
    public FacesMessage msg;
    
    @PostConstruct
    protected abstract void init();
    public void dispMessage(){
        FacesContext context = FacesContext.getCurrentInstance();
        context.addMessage(null, msg );
    }

    public FacesMessage getMsg() {
        return msg;
    }

    public void setMsg(FacesMessage msg) {
        this.msg = msg;
    }
    
}
